package com.ethink.system.api;

import com.ethink.system.api.info.SystemTodoInfo;
import com.ethink.system.api.request.SystemTodoAddRequest;
import com.ethink.system.api.request.SystemTodoListPendingRequest;
import com.ethink.system.api.request.SystemTodoUpdateRequest;
import com.ethink.system.api.response.SystemTodoAddResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * 代办事项表 Facade接口
 *
 * @author default
 * @date 2022-12-09
 */
@FeignClient(name = "ethink-system-service", path = "system-service/facade/v1/systemTodo", contextId = "systemTodoFacade")
public interface SystemTodoFacade {

    @PostMapping("/listSystemTodoPending")
    @ResponseBody
    List<SystemTodoInfo> listSystemTodoPending(@RequestBody SystemTodoListPendingRequest request);

    @PostMapping("/addSystemTodo")
    @ResponseBody
    SystemTodoAddResponse addSystemTodo(@RequestBody SystemTodoAddRequest request);

    @PostMapping("/updateSystemTodo")
    @ResponseBody
    void updateSystemTodo(@RequestBody SystemTodoUpdateRequest request);

    @PostMapping("/doneSystemTodo")
    @ResponseBody
    void doneSystemTodo(@RequestParam("systemTodoId") Long systemTodoId);

    @PostMapping("/doneSystemTodoByDataId")
    @ResponseBody
    void doneSystemTodoByDataId(@RequestParam("todoType") Integer todoType, @RequestParam("dataId") String dataId);

    @PostMapping("/deleteSystemTodo")
    @ResponseBody
    void deleteSystemTodo(@RequestParam("systemTodoId") Long systemTodoId);

    @PostMapping("/deleteSystemTodoByDataId")
    @ResponseBody
    void deleteSystemTodoByDataId(@RequestParam("systemTodoId") String systemTodoDataId);

}